<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnCanMultipleSubmitNeedAssembleInStepTable extends AbstractMigration
{
    public function up()
    {
        $this->table('step')
            ->addColumn('can_multiple_submit', 'enum', ['values' => 'yes,no', 'default' => 'no', 'null' => false, 'comment' => '能否批量提交'])
            ->addColumn('need_assemble', 'enum', ['values' => 'yes,no', 'default' => 'no', 'null' => false, 'comment' => '是否需要组装'])
            ->save();
    }

    public function down()
    {
        $this->table('step')
            ->removeColumn('can_multiple_submit')
            ->removeColumn('need_assemble')
            ->save();
    }
}
